def input_password(password):
    if len(password) < 8:
        raise Exception('len too short')
    else:
        return f"你输入的密码为{password}"


flag = True
while flag:
    try:
        password = input('请输入你的密码:')
        print(input_password(password))
    except Exception as e:
        print(e)
    else:
        break
